<#include "/component/datetime.html" />
<script type="text/javascript">
$(document).ready(function() {
	grading.bindEvent();
});
</script>
<div class="ibox">
	<!-- 增加及删除按钮 -->
	<div class="ibox-title fj-angroup2">
        <h5><#if rule.isDraft><#if rule.id??><@spring.message code='button.edit'/><#else><@spring.message code='button.new'/></#if></#if></h5>
        <#if rule.isDraft>
        <div class="ibox-tools">
        	 <a id="addData">
                 <i class="fa fa-plus-circle fa-lg text-warning"></i>
             </a>
        	 <a id="delRule">
                 <i class="fa fa-trash fa-lg text-danger"></i>
             </a>
         </div>
        </#if>
	</div>
	<!-- 增加及删除按钮end -->
	<!-- 输入框和展示部分 -->
	<div class="ibox-content fj-blog2">
	    <form method="post" id="editinfo" action="${basePath}/grading/save" class="form-horizontal">
	    	<input type="hidden" name="id" value="${rule.id!}" />
			<input type="hidden" id="isDraft" name="isDraft" value="${rule.isDraft!}" />
	        <div class="form-group"><label class="col-sm-2 control-label"><@spring.message code='role.name'/>：</label>
	            <div class="col-sm-10">
	            	<#if rule.isDraft>
						<input type="text" class="form-control" value="${rule.name!}" name="name" />
					<#else>
						<p class="form-control-static">${rule.name!}</p>
					</#if>
	            </div>
	        </div>
	        <div class="hr-line-dashed"></div>
	        <div class="form-group"><label class="col-sm-2 control-label"><@spring.message code='role.type'/>：</label>
	            <div class="col-sm-10">
	            	<#if rule.isDraft>
						<select name="typeId" class="form-control m-b">
							<#if typeList??>
							<#list typeList as item>
							<option value="${item.id!}">${item.name!}</option>
							</#list>
							</#if>
						</select>
					<#else>
						<p class="form-control-static">${rule.type!}</p>
					</#if>
	            </div>
	        </div>
	        <#if !rule.isDraft>
	        <div class="hr-line-dashed"></div>
	        <div class="form-group"><label class="col-sm-2 control-label"><@spring.message code='role.set'/>：</label>
	            <div class="col-sm-10">
	            	<p class="form-control-static">${rule.ruleSet!}</p>
	            </div>
	        </div>
	        <div class="hr-line-dashed"></div>
	        <div class="form-group"><label class="col-sm-2 control-label"><@spring.message code='role.minSize'/>：</label>
	            <div class="col-sm-10">
	            	<p class="form-control-static">${rule.minSize!}</p>
	            </div>
	        </div>
	        <div class="hr-line-dashed"></div>
	        <div class="form-group"><label class="col-lg-2 control-label"><@spring.message code='role.maxSize'/>：</label>
	            <div class="col-lg-10">
	            	<p class="form-control-static">${rule.maxSize!}</p>
	            </div>
	        </div>
	        <div class="hr-line-dashed"></div>
	        <div class="form-group"><label class="col-lg-2 control-label"><@spring.message code='role.role'/>：</label>
	            <div class="col-lg-10">
	            	<p class="form-control-static">${rule.rule!}</p>
	            </div>
	        </div>
	        </#if>
	        <div class="form-group">
	        <div class="col-sm-4 col-sm-offset-2" <#if !rule.isDraft>style="display: none;"</#if> id="buttonDiv">
	            <button class="btn btn-primary" type="button" style="margin-left: 20px;" id="save"><@spring.message code='button.ok'/></button>
	            <button class="btn btn-danger" type="button" id="cancel"><@spring.message code='search.clear'/></button>
	        </div>
	    </div>
	    </form>
	</div>
	<!-- 输入框及展示部分end -->
</div>